package com.test.javabean;
// 实体类
public class Student {
    //1.私有化成员变量
    private String name;
    private int age;
    private double chinese;
    private double math;

    //提供一个无参数的构造器
    public Student() {
    }
    
    //提供一个有参数的构造器
    public Student(String name, int age, double chinese, double math) {
        this.name = name;
        this.age = age;
        this.chinese = chinese;
        this.math = math;
    }

    //2.提供公有的getter和settter方法 右键->Generate->Getter and Setter
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getChinese() {
        return chinese;
    }

    public void setChinese(double chinese) {
        this.chinese = chinese;
    }

    public double getMath() {
        return math;
    }

    public void setMath(double math) {
        this.math = math;
    }
}
